/* ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
   Module Name          : com.yaodian100.core.thread.service.RunCase01
   Module Description   :

   Date Created      : 2008/12/4
   Original Author   : jeffma
   Team              : Yaodian100
   ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
   MODIFICATION HISTORY
   ------------------------------------------------------------------------------
   Date Modified       Modified by       Comments
   ------------------------------------------------------------------------------
   ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
package com.yaodian100.core.thread.service;

import java.sql.Date;
import java.text.SimpleDateFormat;
import java.util.Random;

import com.yaodian100.core.thread.batch.AbstractRunJob;

/**
 * @author jeffma
 */
public class RunCase01 extends AbstractRunJob {

	/** default constructors */
	public RunCase01(String code) {
		super(code);
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see java.lang.Runnable#run()
	 */
	@Override
	public void execute() {
		SimpleDateFormat sdf = new SimpleDateFormat("HH:mm:ss SSS");
		Date start = new Date(System.currentTimeMillis());
		Random r = new Random(start.getTime());
		int sleep = r.nextInt() % 200 + 1000;
		try {
			Thread.sleep(sleep > 0 ? sleep : -sleep);
		} catch (InterruptedException e) {
			e.printStackTrace();
		}

		Date end = new Date(System.currentTimeMillis());
	}
}
